package PROYECTO2.src.Naves.Jugador;
import java.net.URL;
import javax.swing.ImageIcon;

import PROYECTO2.src.Explosiones_Disparos.Shot;
import PROYECTO2.src.Naves.Spaceship;

public class Rhino extends Colonial {

	protected static URL url = (Spaceship.class.getClassLoader().getResource("PROYECTO2/src/img/Jugador/Rhino.gif"));
	private static final int defaultWidth = 27;
	private static final int defaultHeight = 38;
	private static final int defaultSpeed = 2;
	private static final int defaultLife = 8;
	
	
	public Rhino(){
		super(defaultLife,defaultSpeed,new ImageIcon(url),defaultWidth,defaultHeight);
		x = 400;
		y = 450;
	}


	public void shooting() {
		if(power == 1){
			game.addShotColonial(new Shot(x + width/2 - 10 , y, 0, 1, speedLaser));
			game.addShotColonial(new Shot(x + width/2 + 10 , y, 0, 1, speedLaser));
		}
		else
			super.shooting();	
	}
	
	public static String getEstadisticas(){
		ImageIcon icon = new ImageIcon(url);
		return ("<html>VIDA: "+defaultLife+"<br>VELOCIDAD: "+defaultSpeed+"<br>POTENCIA INICIAL: "+2+"<br>ALTO: "+icon.getIconHeight()+"<br>ANCHO: "+icon.getIconWidth()+"</html>");
	}
	
}